package serves.Impl;

import Util.PageUtil;
import bean.TInsect;
import dao.Impl.insectDaoimpl;
import dao.insectDao;
import serves.insectSev;

import java.util.List;

public class insectSevImpl implements insectSev {
    insectDao id = new insectDaoimpl();
    @Override
    public List<TInsect> insectlist() {
        return id.insectlist();
    }

    @Override
    public PageUtil<TInsect> ListByPage(int pageNo, int pagesize, String insectname) {
        List<TInsect>bs = id.ListByPage(pageNo,pagesize,insectname);
        int count  =id.getListCount(insectname);
        PageUtil<TInsect>insects= new PageUtil<>(bs,pageNo,pagesize,count);
        return insects;
    }

    @Override
    public boolean add(TInsect insect) {
        return id.add(insect);
    }

    @Override
    public boolean delete(TInsect insect) {
        return false;
    }

    @Override
    public TInsect find(TInsect insect) {
        return null;
    }
}
